package org.microdream.easy.deploy.web;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/dServer")
public class DServerWeb {

	@GetMapping("/main")
	public String main() {
		return "/pages/server/servers-main";
	}
	
	@GetMapping("/add")
	public String add() {
		return "/pages/server/server-add";
	}
	
	@GetMapping("/addAuth")
	public String addAuth(String serverCode, ModelMap m) {
		m.put("serverCode", serverCode);
		return "/pages/server/auth-add";
	}
	
	@GetMapping("/modAuth")
	public String modAuth(int id, ModelMap m) {
		m.put("id", id);
		return "/pages/server/auth-add";
	}
}
